import 'package:flutter/material.dart';

class MyCustomForm extends StatelessWidget {
  const MyCustomForm({super.key});

  @override
  Widget build(BuildContext context) {
    return ListView(
      children: <Widget>[
        ElevatedButton(
          onPressed: () {},
          child: const Text("Button"),
        ),
        ElevatedButton(
          onPressed: () {},
          child: const Text("Button"),
        ),
        ElevatedButton(
          onPressed: () {},
          child: const Text("Button"),
        ),
        ElevatedButton(
          onPressed: () {},
          child: const Text("Button"),
        ),
        const Padding(
          padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
          child: TextField(
            decoration: InputDecoration(
              border: OutlineInputBorder(),
              hintText: 'Enter a search term',
            ),
          ),
        ),
        Padding(
          padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 16),
          child: TextFormField(
            autofocus: false,
            decoration: const InputDecoration(
              border: UnderlineInputBorder(),
              labelText: 'Enter your username',
            ),
          ),
        ),
        Padding(
          padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 16),
          child: TextFormField(
            decoration: const InputDecoration(
              border: UnderlineInputBorder(),
              labelText: 'Enter your phone',
            ),
            keyboardType: TextInputType.phone,
          ),
        ),
        Padding(
          padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 16),
          child: TextFormField(
            decoration: const InputDecoration(
              border: UnderlineInputBorder(),
              labelText: 'Enter your streetAddress',
            ),
            keyboardType: TextInputType.streetAddress,
          ),
        ),
        ElevatedButton(
          onPressed: () {},
          child: const Text("Button"),
        ),
        ElevatedButton(
          onPressed: () {},
          child: const Text("Button"),
        ),
        ElevatedButton(
          onPressed: () {},
          child: const Text("Button"),
        ),
        ElevatedButton(
          onPressed: () {},
          child: const Text("Button"),
        ),
      ],
    );
  }
}

class InputPage extends StatelessWidget {
  const InputPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Center(
      child: TextFormField(),
    );
  }
}

class InputPage2 extends StatelessWidget {
  const InputPage2({super.key});

  @override
  Widget build(BuildContext context) {
    return ListView(
      children: [
        Padding(
          padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 16),
          child: TextFormField(
            autofocus: true,
            decoration: const InputDecoration(
              border: UnderlineInputBorder(),
              labelText: 'Enter your streetAddress',
            ),
            keyboardType: TextInputType.streetAddress,
          ),
        ),
      ],
    );
  }
}
